//此处放课程管理界面API接口，编写者：@tangmengkai
import axios from 'axios';

const apiClient = axios.create({
    //测试用后端路径
    baseURL: 'http://localhost:8000/course/',
    headers: {
        'Content-Type': 'application/json',
    },
});

export default {
    getAll(){
        return apiClient.get('get_all/')
    },
    del_one(course_name){
        return apiClient.post('del_one/',{
            type:"del",
            del_id:course_name
        })
    },
    add_one(formData){
        return apiClient.post('add_one/',formData);
    },
    updata_one(formData,old_name){
        return apiClient.post('updata_one/',{
            formData,
            old_name
        })
    }
};
